<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-slide.css"/>
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css"/>
    <title>商品详情</title>
    <style type="text/css">
        body {
            font-size: 14px;
            word-wrap: break-word;
        }

        #contain-1 {
            display: block;
        }

        #contain-2 {
            display: none;
            background: #fff;
            padding: 10px;
            line-height: 24px;
        }

        #contain-2 img {
            width: 100%;
        }

        .aui-content {
            background: #fff;
        }

        .slide-imgobj {
            background-size: cover;
            width: 100%;
            height: 100%;
            /*background-position:center center;*/
        }

        .item-title {
            font-size: 15px;
        }

        .text-gray {
            color: #666;
        }

        .text-price {
            color: red;
            font-size: 20px;
        }

        .shareBtn {
            text-align: center;
            font-size: 13px;
        }

        .price-row {
            margin-top: 10px;
            font-size: 12px;
        }

        .mt-10 {
            margin-top: 10px;
        }

        .mt-5 {
            margin-top: 5px;
        }

        .aui-icon-favorfill,
        .aui-icon-favor {
            color: red;
        }
    </style>
</head>
<body>
<div id="contain-1" class="contain_wrap">
</div>
<div id="contain-2" class="contain_wrap" style="min-height: 100%;">
    <!-- <img src="https://img.alicdn.com/imgextra/i3/2279855128/TB2_z17aR0lpuFjSszdXXcdxFXa_!!2279855128.jpg" />
    <img src="https://img.alicdn.com/imgextra/i2/2279855128/TB2lyfMa4hmpuFjSZFyXXcLdFXa_!!2279855128.jpg" />
    <img src="https://img.alicdn.com/imgextra/i3/2279855128/TB2QyTLa.hnpuFjSZFEXXX0PFXa_!!2279855128.jpg" /> -->
</div>

</body>
<script id="contain-1-template" type="text/x-dot-template">
    <div class="slide">
        <div id="aui-slide">
            <div class="aui-slide-wrap">
                <div class="aui-slide-node ">
                    <div class="slide-imgobj" style="background-image: url({{=it.thumb}});"></div>
                </div>
                {{? it.thumb1}}
                <div class="aui-slide-node ">
                    <div class="slide-imgobj" style="background-image: url({{=it.thumb1}});"></div>
                </div>
                {{?}}
                {{? it.thumb2}}
                <div class="aui-slide-node ">
                    <div class="slide-imgobj" style="background-image: url({{=it.thumb2}});"></div>
                </div>
                {{?}}
            </div>
            <div class="aui-slide-page-wrap"><!--分页容器--></div>
        </div>
    </div>

    <div class="aui-content">
        <ul class="aui-list-view">
            <li class="aui-list-view-cell">
                <div class="aui-flex-col">
                    <div class="aui-flex-item-10" style="padding-right: 15px;">
                        <div class="item-title">{{=it.title}}</div>
                        <div class="text-gray price-row"><span class="text-price">¥{{=it.price}}</span>
                            &nbsp;&nbsp;{{? it.wholesale_num>0}}{{=it.wholesale_num}}条起批{{?}}
                        </div>
                    </div>
                    <div class="aui-flex-item-2">
                        <div class="shareBtn aui-border-l text-gray">
                            <span class="aui-iconfont aui-icon-share"></span>
                            <div onclick="showShare();">分享</div>
                        </div>
                    </div>
                </div>
                <div class="aui-flex-col text-gray mt-10" style="font-size: 12px;">

                    <div class="aui-flex-item-12 aui-clearfix">
                        <div class="aui-pull-left" style="margin-right: 15px;">
                            已成交{{=it.sales}}条
                        </div>
                        <div class="aui-pull-left" style="margin-right: 15px;">
                            快递：¥{{? it.fee_start_1}}{{=it.fee_start_1}}{{??}}未填写{{?}}
                        </div>
                        <div class="aui-pull-left" style="padding-left:5px;word-wrap: break-word;">
                            发货地：{{? it.area}}{{=it.area}}{{??}}未填写{{?}}
                        </div>
                    </div>

                    <!-- <div class="aui-flex-item-3">
                        已成交{{=it.sales}}条
                    </div>
                    <div class="aui-flex-item-3">
                        快递：¥{{? it.fee_start_1}}{{=it.fee_start_1}}{{??}}未填写{{?}}
                    </div>
                    <div class="aui-flex-item-6" style="padding-left:5px;">
                        发货地：{{? it.area}}{{=it.area}}{{??}}未填写{{?}}
                    </div> -->
                </div>
            </li>
        </ul>
    </div>

    {{? it.company.userid!=myUid}}
    <div class="aui-content">
        <ul class="aui-list-view">
            <li class="aui-list-view-cell" onclick="showAttribute();">
                <div class="aui-arrow-right text-gray">规格选择</div>
            </li>
        </ul>
    </div>
    {{?}}

    {{? it.attribute}}
    <div class="aui-content">
        <ul class="aui-list-view">
            <li class="aui-list-view-cell">
                <!-- <div class="aui-arrow-right text-gray">产品属性</div> -->
                <div class="text-gray">产品属性</div>
            </li>
            <li class="aui-list-view-cell">
                <div class="aui-flex-col">
                    {{ for(var i in it.attribute){ }}
                    <div class="aui-flex-item-3">
                        {{=it.attribute[i].name}}
                    </div>
                    <div class="aui-flex-item-9">
                        {{=it.attribute[i].attribute}}
                    </div>
                    {{ } }}
            </li>
        </ul>
    </div>
    {{?}}

    {{? it.comment }}
    <div class="aui-content">
        <ul class="aui-list-view">
            <li class="aui-list-view-cell"  tapmode onclick="goToAllComment('{{=it.itemid}}')">
                <div class="aui-arrow-right text-gray" >买家评论</div>
            </li>
            <li class="aui-list-view-cell">
                {{ for(var g in it.comment){ }}
                <div>商品满意度&nbsp;&nbsp;

                    {{ for(var j=0;j<5;j++){ }}
                    <span class="aui-iconfont aui-icon-favor{{? it.comment[g].satisfaction_degree>j }}fill{{?}}"></span>
                    {{ } }}
                </div>
                <div class="mt-5">{{=it.comment[g].buyer}}：{{=it.comment[g].buyer_comment}}</div>
                <!--<div class="mt-5" style="font-size: 12px;color:#aaa;">颜色：黑色 | 尺寸：大码</div>-->
                <div class="mt-5" style="font-size: 12px;color:#aaa;">{{=it.comment[g].spec}}</div>
                {{}}}
            </li>
            <li class="aui-list-view-cell" style="text-align: center;">
                <div class="aui-btn aui-btn-outlined text-gray" tapmode onclick="goToAllComment('{{=it.itemid}}')">
                    查看全部评论
                </div>
            </li>
        </ul>
    </div>
    {{?}}

    <div class="aui-content">
        <ul class="aui-list-view">
            <li class="aui-list-view-cell aui-img" onclick="go2Shop('{{=it.company.userid}}')">
                <div class="aui-arrow-right">
                    <img class="aui-img-object aui-pull-left" src="{{=it.company.thumb}}">
                    <div class="aui-img-body">
                        {{=it.company.company}}
                        <p class="text-gray">
                            {{?it.company.regyear<1}}
                            <1年
                            {{??}}
                            {{=it.company.regyear}}年
                            {{?}}
                        </p>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</script>
<script id="contain-2-template" type="text/x-dot-template">
    {{=it.content.content}}
</script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/aui-slide.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    var pageData;
    var myUid;
    apiready = function () {
        var FNScanner = api.require('FNScanner');
        // setTimeout(function () {
        FNScanner.openScanner({
            autorotation: true
        }, function (ret, err) {
            if (ret) {
                alert(JSON.stringify(ret))
            }
        })
    }

</script>
</html>

